package cn.lovecyy.mockjson.core.funcs;

import cn.hutool.core.util.StrUtil;
import cn.lovecyy.mockjson.core.domain.TypeConfig;

/**
 * TpUpperCase
 *
 * @author Yakir
 */
public class ToUpperCaseFunc implements FuncMock {

	@Override
	public String getFuncName() {
		return "toUpper";
	}

	@Override
	public Object apply(TypeConfig config, String... args) {
		if (args == null || args.length < 1)
			return args != null && args.length > 0 ? args[0] : null;
		String value = args[0];
		return value.toUpperCase();
	}

}
